package com.yzs.exam.service;

import com.github.pagehelper.PageInfo;
import com.yzs.exam.entity.Question;
import com.yzs.exam.viewmodel.admin.question.QuestionEditRequestVM;
import com.yzs.exam.viewmodel.admin.question.QuestionPageRequestVM;
import com.yzs.exam.viewmodel.student.exam.ExamPaperQuestionsAttrVM;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author yzs
 * @create 2021-03-27 15:40
 */
public interface QuestionService extends BaseService<Question> {

    PageInfo<Question> page(QuestionPageRequestVM requestVM);

    Question insertFullQuestion(QuestionEditRequestVM model, Integer userId);

    Question updateFullQuestion(QuestionEditRequestVM model);

    QuestionEditRequestVM getQuestionEditRequestVM(Integer questionId);

    QuestionEditRequestVM getQuestionEditRequestVM(Question question);

    Integer selectAllCount();

    List<Integer> selectMothCount();

    List<Integer> selectQuestionId(@Param("subjectId")Integer subjectId, @Param("difficultId")Integer difficultId);

    List<Integer> selectNotErrorQuestionId(ExamPaperQuestionsAttrVM vm);

    List<Question> selectQuestionsByIds(List<Integer> ids);

    List<Question> selectByLevelTypeChapters(Integer type, List<Integer> chapters);
}